home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / x / gui / xfract.lha / xfract / xmntn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-27  |  2.4 KB  |  73 lines

  1. /*****************************************************************************
  2. /* FILE        : xmntn.h
  3. /* AUTHOR    : Paul Sharpe @ DEC (OSCR-Europe, Reading, England).
  4. /* DATE        : July 20, 1989
  5. /* FUNCTION    : X-windows Fractal Brownian-Motion mountains.
  6. /* INSPIRATION    : 'The Science Of Fractal Images.'
  7. /*
  8. /*   Copyright (c) Digital Equipment Corporation 1990  All rights reserved.
  9. /*   Copyright is claimed in the computer program and user interface thereof.
  10. /*
  11. /*   Digital Equipment Corporation cannot accept any responsibility for
  12. /*   use, misuse, or abuse of this software.
  13. /*
  14. /*****************************************************************************/
  15.  
  16. /*****************************************/
  17. /* CONFIGURE THIS SECTION AS REQUIRED... */
  18. /*****************************************/
  19.  
  20. #define FNTFILE         "fixed"
  21. #define PROGTITLE    "Xmntn"
  22.  
  23. /* The argument list processing structure... */
  24. #define NUMARGS    15
  25. struct opts    args[NUMARGS] = {
  26. {"-display",    "-ds", "",        "-display serverstring"},
  27. {"-foreground", "-fg", "white",        "-foreground colour"},
  28. {"-background", "-bg", "red",        "-background colour"},
  29. {"-textfg",      "-tf", "white",        "-textfg  colour"},
  30. {"-textbg",      "-tb", "blue",        "-textbg  colour"},
  31. {"-seacolour",  "-sc", "blue",        "-seacolour  colour"},
  32. {"-mntncolour", "-mc", "forestgreen",    "-mntncolour colour"},
  33. {"-numcolours", "-nc", "50",        "-numcolours integer"},
  34. {"-colours",      "-cl", "g",        "-colours r|g|b"},
  35. {"-fontfile",    "-fn", FNTFILE,        "-fontfile fontfile"},
  36. {"-H",        "-hg", "0.9",        "-H double"},
  37. {"-scale",     "-sl", "2.5",        "-scale double"},
  38. {"-level",      "-lv", "6",        "-level integer[3-~8]"},
  39. {"-xscale",    "-sx", "4",        "-xscale integer[1-4]"},
  40. {"-yscale",    "-sy", "2",        "-yscale integer[1-4]"},
  41. };
  42.  
  43. #define XOFFSET         0
  44. #define YOFFSET         0
  45. #define HEIGHT          5
  46.  
  47. /*****************************************/
  48. /* END OF CONFIGURATION SECTION...       */
  49. /*****************************************/
  50.  
  51. #define PNTS(i,px,py)    {pnts[(i)].x=(px);pnts[(i)].y=(py);}
  52. #define PIXELX(x,y)    (XOFFSET + (square - (x) + (y)) * xscale)
  53. #define    PIXELY(x,y)    (basey - YOFFSET - (square-(x)+square-(y))*yscale)
  54.  
  55. char    *progtitle = PROGTITLE;
  56. char    *bckgrnd   = BCKGRND;
  57. char    *iconfile  = ICONFILE;
  58.  
  59. extern int    screenwidth, screenheight;
  60. extern int    square;
  61. extern struct mntn {
  62.     double      **elevs;
  63.     int         **px;
  64.     int         **py;
  65. } mntndata;
  66. extern int    basey;
  67. extern Window    wndw;
  68. extern GC    maingc, seagc;
  69. extern Display    *dsply;
  70. extern long    mc;
  71.  
  72. int    xscale, yscale;
  73.